home *** CD-ROM | disk | FTP | other *** search
/ System Booster / System Booster.iso / Archives / Replacements / cpdist_0_17.lha / cpdist-0.17 / source / Makefile.A < prev    next >
Makefile  |  1994-05-28  |  2KB  |  99 lines

  1. # CPDIST Makefile for the GNU C/C++ Compiler on the Commodore Amiga
  2. #
  3. # (c)Copyright 1992-93 by Tobias Ferber.
  4. #
  5. # This file is part of CPDIST.
  6. #
  7. # CPDIST is free software; you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published
  9. # by the Free Software Foundation; either version 1 of the License, or
  10. # (at your option) any later version.
  11. #
  12. # CPDIST is distributed in the hope that it will be useful,
  13. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. # GNU General Public License for more details.
  16. #
  17. # You should have received a copy of the GNU General Public License
  18. # along with CPDIST; see the file COPYING.  If not, write to
  19. # the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  20.  
  21. CC=gccv
  22.  
  23. # -DNO_GETKEY   use gets() instead of device dependent getkey()
  24. # -DNO_PERROR   don't use perror()
  25.  
  26. CFLAGS= -O
  27.  
  28. # CPDIST will compile w/o Amiga dependent material (amiga.lib & includes)
  29. # if   cpdist.c    is compiled w/  -DNO_GETKEY
  30. # and  filecopy.c  is compiled w/o -UAMIGA
  31.  
  32. # getkey() needs libcurses.a and libtermlib.a on unix machines
  33. LIBS= -L/usr/os-lib -lamiga -L/usr/lib -lcurses
  34.  
  35.  
  36. # *** / CPDIST / ***
  37.  
  38. .PHONY: all
  39.  
  40. all: cpdist
  41.  
  42. #add getkey.o to the rhs if compiled w/o -DNO_GETKEY
  43. cpdist: main.o args.o msg.o cpdist.o keys.o filecopy.o getkey.o
  44.     $(CC) $(CFLAGS) -o $@ $(LIBS) $?
  45.  
  46. main.o: main.c cpdist.h
  47.     $(CC) $(CFLAGS) -c -o $@ $<
  48.  
  49. args.o: args.c
  50.     $(CC) $(CFLAGS) -c -o $@ $<
  51.  
  52. msg.o: msg.c cpdist.h
  53.     $(CC) $(CFLAGS) -c -o $@ $<
  54.  
  55. cpdist.o: cpdist.c cpdist.h
  56.     $(CC) $(CFLAGS) -c -o $@ $<
  57.  
  58. keys.o: keys.c cpdist.h
  59.     $(CC) $(CFLAGS) -c -o $@ $<
  60. #    $(CC) $(CFLAGS) -DNO_GETKEY -c -o $@ $<
  61.  
  62. #only needed if cpdist.o is _NOT_ compiled w/ -DNO_GETKEY
  63. getkey.o: getkey.c getkey.h
  64.     $(CC) -Iinclude: $(CFLAGS) -c -o $@ $<
  65.  
  66. #use -UAMIGA to use c.lib's malloc() instead of exec.library's AllocMem()
  67. filecopy.o: filecopy.c filecopy.h
  68.     $(CC) $(CFLAGS) -Iinclude: -c -o $@ $<
  69. #    $(CC) $(CFLAGS) -UAMIGA -c -o $@ $<
  70.  
  71.  
  72. # *** / GETKEY / ***
  73.  
  74. getkey: getkey.c getkey.h
  75.     $(CC) $(CFLAGS) -DTEST -o $@ $< $(LIBS)
  76.  
  77.  
  78. # *** / CLEAN / ***
  79.  
  80. .PHONY: clean
  81.  
  82. clean:
  83.     rm *.o cpdist
  84.  
  85.  
  86. # *** / DEPEND / ***
  87.  
  88. .PHONY: depend
  89.  
  90. depend:
  91.     $(CC) -MM $(CFLAGS) *.c > .depend
  92.  
  93.  
  94. #include the dependency file (if it exists)
  95.  
  96. ifeq (.depend,$(wildcard .depend))
  97. include .depend
  98. endif
  99.